name = "owen"
pre = "hunan"
age = 26
salary = 10000.5

# 字符串替代  字符串是 %s;整数 %d;浮点数%f
name1 = "my name is %s, i come from %s, i am %d, i salary %f"%(name, pre, age, salary)
print(name1)

name2 = 'my name is {name}, i com from {pre}, i am {age}, i salary {salary}'.format(name=name, age=age, pre=pre, salary=salary)
print(name2)

name3 = 'my name is {0}, i com from {1}, i am {2}, i salary {3}'.format(name, pre, age, salary)
print(name3)

# 移除先后的空白
print(name1.strip())
print(name.endswith("o"))
print(name.find('o'))